package com.itheima.dao;

import com.itheima.domain.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserDao {
    @Insert("INSERT INTO USER VALUES(#{id},#{username},#{email})")
    void save(User user);
    @Delete("DELETE FROM user WHERE id=#{id}")
    void delete(Integer id);
    @Update("UPDATE user SET username=#{username},email=#{email} WHERE id=#{id}")
    void update(User user);
    @Select("SELECT *FROM user WHERE id=#{id}")
    User selectByid(Integer id);
}
